package ${config.basePackage}.${artifact.relatedPackage};

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:spring/app-context.xml"})
public class ${materialDetail.material.domainName}ServiceTest {

	@Autowired
	private ${materialDetail.material.domainName}Service ${materialDetail.material.domainName?uncap_first}Service;
	
	@Before
	public void setUp() throws Exception {
	}

	@After
	public void tearDown() throws Exception {
	}

	@Test
	public void testSave() {
		/*
		${materialDetail.material.domainName} ${materialDetail.material.domainName?uncap_first} = new ${materialDetail.material.domainName}();
		<#list materialDetail.pcMappings as pcMapping>
		${materialDetail.material.domainName?uncap_first}.set${pcMapping.propertyName?cap_first}();
		</#list>
		${materialDetail.material.domainName?uncap_first}Service.save(${materialDetail.material.domainName?uncap_first});
		*/
	}

	@Test
	public void testFind() {
		/*
		Criteria criteria = new Criteria();
		List<${materialDetail.material.domainName}> result = ${materialDetail.material.domainName?uncap_first}Service.find(criteria);
		
		for ( ${materialDetail.material.domainName} ${materialDetail.material.domainName?uncap_first} : result ) {
			System.out.println(${materialDetail.material.domainName?uncap_first});
		}
		*/
	}
	
	@Test
	public void testRemove() {
		/*
		${materialDetail.material.domainName?uncap_first}Service.remove();
		*/
	}

}
